package com.hdu.degrete;


import com.hdu.degrete.aspect.DegrateAspect;
import com.hdu.degrete.controller.GlobalExceptionHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
@EnableAspectJAutoProxy
public class DegrateAutoConfiguration {

    @Bean
    public DegrateAspect degrateAspect() {
        return new DegrateAspect();
    }

    @Bean
    public GlobalExceptionHandler globalExceptionHandler() {
        return new GlobalExceptionHandler();
    }
}
